//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.example.mapper;

import com.example.entity.Department;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface DepartmentMapper {
    List<Department> selectAll(Department department);

    @Select({"select * from department where id = #{id}"})
    Department selectById(Integer id);

    @Insert({"insert into department (name) values (#{name}"})
    int insert(Department department);//后端_，前端驼峰

    @Update({"update department set name = #{name} where id = #{id}"})
    int updateById(Department department);

    @Delete({"delete from department where id = #{id}"})
    int deleteById(Integer id);
}
